import request from "@/utils/request";
// import store from "@/store";

// 获得用户列表
export const userlist = (params) => {
    return request({
        url: "/user/list",
        params,
        /*  headers: {
             token: store.state.login.token
         } */
    })
}

// 添加用户
export const userAdd = (data) => {
    return request({
        url: '/user/add',
        method: 'post',
        data
    })
}

// 设置用户状态
export const userStatus = (data) => {
    return request({
        url: `/user/status`,
        method: 'post',
        data
    })
}

// 修改用户
export const userEdit = (data) => {
    return request({
        url: '/user/edit',
        method: 'post',
        data
    })
}

// 删除用户
export const userRemove = (id) => {
    return request({
        url: '/user/remove',
        method: 'POST',
        data: {
            id: id
        }
    })
}